import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/login',
      // name: 'login',
      component: () => import('../views/login/HM-login.vue')
    },
    {
      path: '/',
      // name: 'layout',
      redirect:'/dashboard',
      component: () => import('../views/layout/HM-layout.vue'),
      children: [{
        path: 'dashboard',
        name: 'HM-dashboard',
        component: () => import('../views/dashboard/HM-dashboard.vue'),
      },{
        path: '/ParkBuilding',
        name: 'ParkBuilding',
        component: () => import('../views/ParkManagement/Park-building.vue'),
      },{
        path: '/ParkBusiness',
        name: 'ParkBusiness',
        component: () => import('../views/ParkManagement/Park-business.vue'),
      },{
        path: '/FleetTerritory',
        name: 'FleetTerritory',
        component: () => import('../views/FleetManagement/Fleet-territory.vue'),
      },{
        path: '/FleetCard',
        name: 'FleetCard',
        component: () => import('../views/FleetManagement/Fleet-card.vue'),
      },{
        path: '/FleetPayment',
        name: 'FleetPayment',
        component: () => import('../views/FleetManagement/Fleet-payment.vue'),
      },{
        path: '/FleetRules',
        name: 'FleetRules',
        component: () => import('../views/FleetManagement/Fleet-rules.vue'),
      },{
        path: '/PropertyFee',
        name: 'PropertyFee',
        component: () => import('../views/PropertyFee/Property-fee.vue'),
      },{
        path: '/IntegratedPole',
        name: 'IntegratedPole',
        component: () => import('../views/IntegratedPole/Intefrated-pole.vue'),
      },{
        path: '/AlarmLog',
        name: 'AlarmLog',
        component: () => import('../views/IntegratedPole/Alarm-log.vue'),
      },{
        path: '/SystemEmployee',
        name: 'SystemEmployee',
        component: () => import('../views/SystemManagement/System-employee.vue'),
      },{
        path: '/SystemRole',
        name: 'SystemRole',
        component: () => import('../views/SystemManagement/System-role.vue'),
      }
    ]
    },
  ]
})

export default router
